package com.yjy.xml.v1;

import javax.xml.bind.annotation.*;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "Message")
public class CbhbRspTransaction<R> {

    @XmlElement(name = "Head")
    private CommHead commHead;

    @XmlAnyElement(lax = true) // 该注解去掉xml中带的xsi:type等信息
    private R mainData;

    public CommHead getCommHead() {
        return commHead;
    }

    public void setCommHead(CommHead commHead) {
        this.commHead = commHead;
    }

    public R getMainData() {
        return mainData;
    }

    public void setMainData(R mainData) {
        this.mainData = mainData;
    }

    @XmlType(name = "Head")
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class CommHead {

        /**
         * 交易请求流水号
         */
        @XmlElement(name = "ReqJnlNo")
        private String reqJnlNo;
        @XmlElement(name = "ResJnlNo", nillable = true)
        private String resJnlNo;
        @XmlElement(name = "ResDate", nillable = true)
        private String resDate;
        @XmlElement(name = "ResTime", nillable = true)
        private String resTime;

        public String getReqJnlNo() {
            return reqJnlNo;
        }

        public void setReqJnlNo(String reqJnlNo) {
            this.reqJnlNo = reqJnlNo;
        }

        public String getResJnlNo() {
            return resJnlNo;
        }

        public void setResJnlNo(String resJnlNo) {
            this.resJnlNo = resJnlNo;
        }

        public String getResDate() {
            return resDate;
        }

        public void setResDate(String resDate) {
            this.resDate = resDate;
        }

        public String getResTime() {
            return resTime;
        }

        public void setResTime(String resTime) {
            this.resTime = resTime;
        }
    }
}